package ui.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

import base.BaseFragment;

/**
 * Fragment适配器
 */

public class HomepageFragmentAdapter extends FragmentStatePagerAdapter {
    private List<BaseFragment> mlist;

    public HomepageFragmentAdapter(FragmentManager fm, List<BaseFragment> list) {
        super(fm);
        this.mlist = list;
    }

    @Override
    public BaseFragment getItem(int position) {
        return mlist.get(position);
    }

    @Override
    public int getCount() {
        return mlist.size();
    }
}
